package run.halo.app.event.post;

import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
import run.halo.app.utils.ServiceUtils;

/**
 * Site visit event.
 *
 * @author johnniang
 * @date 19-4-22
 */
public class SiteVisitEvent extends AbstractVisitEvent {

    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     * @param siteId site id must not be null
     */
    public SiteVisitEvent(Object source, @NonNull Integer siteId) {
        super(source, siteId);
        Assert.isTrue(!ServiceUtils.isEmptyId(siteId), "Site id must not be empty");
    }
}
